package com.xxx.controller;

import org.springframework.security.crypto.bcrypt.BCrypt;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @version v1.0
 * @Description:
 * @Author zhanzhongxin
 * @Date 2021/8/31 10:59
 * @Copyright 博为峰
 */
public class Test {
    public static void main(String[] args) {
        final BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
        final String encode = passwordEncoder.encode("123466");
        System.out.println(encode);
        System.out.println("abcfasdfdsfdsfsadfsdfsadfsdfsdfsdfsdfsdfsadfsdfsdfsdfsdfsadfads".length());
        final String hashpw = BCrypt.hashpw("123456", "abafasdfdsfdsfsadfsdfsadfsdfsdfsdfsdfsdfsadfsdfsdfsdfsdfsadfads");
        System.out.println("hashpw = " + hashpw);
    }
}
